var o = require("../../utils/api.js"), a = getApp();

Page({
    data: {
        info: "",
        price: !0,
        user: "",
        rkList: [],
        showLoding: !0,
        diy_community_name: a.globalData.diy_community_name
    },
    onLoad: function(o) {},
    onShow: function(t) {
        var e = this;
        e.setData({
            showLoding: !e.data.showLoding
        }), o.seeTeam({
            openid: a.globalData.openid
        }).then(function(o) {
            console.log(o), e.setData({
                info: o.data
            });
        }), wx.setNavigationBarColor({
            frontColor: wx.getStorageSync("basic").topcolor,
            backgroundColor: wx.getStorageSync("basic").topbg
        }), o.getMember({
            openid: a.globalData.openid
        }).then(function(o) {
            console.log(o), e.setData({
                user: o.data,
                showLoding: !e.data.showLoding
            });
        }), o.GetTeamRank({
            openid: a.globalData.openid
        }).then(function(o) {
            0 == o.errno && e.setData({
                rkList: o.data
            });
        }), o.seeTeamRecommend({
            openid: a.globalData.openid
        }).then(function(o) {
            e.setData({
                recommendInfo: o.data
            });
        }), setTimeout(function() {
            e.setData({
                rotate: !1
            });
        }, 800);
    },
    code: function() {
        wx.scanCode({
            onlyFromCamera: !0,
            success: function(o) {
                console.log(o);
            }
        });
    },
    rotate: function() {
        var o = this;
        o.setData({
            rotate: !0
        }), o.onShow();
    },
    saoma: function() {
        wx.scanCode({
            onlyFromCamera: !0,
            success: function(o) {
                console.log(o), wx.navigateTo({
                    url: "/pages/groupCenter/verification?id=" + o.result
                });
            }
        });
    },
    searchcode: function() {
        var o = this.data.inputVal;
        if ("" == o || void 0 == o) return wx.showToast({
            title: "请输入核销码",
            icon: "none",
            duration: 2e3
        }), !1;
        wx.navigateTo({
            url: "/pages/groupCenter/verification?id=" + o
        });
    },
    inputblur: function(o) {
        var a = this, t = o.detail.value;
        a.setData({
            inputVal: t
        });
    }
});